package corba.airlineServer;


/**
* corba/corba.airlineServer/_ServerStub.java .
* ��IDL-to-Java ������ (����ֲ), �汾 "3.2"���
* ��AirlineServant.idl
* 2014��4��27�� ������ ����01ʱ56��06�� CST
*/

public class _ServerStub extends org.omg.CORBA.portable.ObjectImpl implements corba.airlineServer.Server
{

  public String[] queryCity2 ()
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("queryCity2", true);
                $in = _invoke ($out);
                String $result[] = corba.airlineServer.citylistHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return queryCity2 (        );
            } finally {
                _releaseReply ($in);
            }
  } // queryCity2

  public corba.airlineServer.Flight[] queryFlights2 (String deptString, String destString, String deptDateString, String returnDateString)
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("queryFlights2", true);
                $out.write_string (deptString);
                $out.write_string (destString);
                $out.write_string (deptDateString);
                $out.write_string (returnDateString);
                $in = _invoke ($out);
                corba.airlineServer.Flight $result[] = corba.airlineServer.flightsHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return queryFlights2 (deptString, destString, deptDateString, returnDateString        );
            } finally {
                _releaseReply ($in);
            }
  } // queryFlights2

  public String book2 (String flightNoString1, String deptString, String classString1, String flightNoString2, String returnString, String classString2, String nameString, String creditString)
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("book2", true);
                $out.write_string (flightNoString1);
                $out.write_string (deptString);
                $out.write_string (classString1);
                $out.write_string (flightNoString2);
                $out.write_string (returnString);
                $out.write_string (classString2);
                $out.write_string (nameString);
                $out.write_string (creditString);
                $in = _invoke ($out);
                String $result = $in.read_string ();
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return book2 (flightNoString1, deptString, classString1, flightNoString2, returnString, classString2, nameString, creditString        );
            } finally {
                _releaseReply ($in);
            }
  } // book2

  public String queryRates2 (String flightString, String classString)
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("queryRates2", true);
                $out.write_string (flightString);
                $out.write_string (classString);
                $in = _invoke ($out);
                String $result = $in.read_string ();
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return queryRates2 (flightString, classString        );
            } finally {
                _releaseReply ($in);
            }
  } // queryRates2

  public String queryAirline2 (String deptString, String dsctString)
  {
            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("queryAirline2", true);
                $out.write_string (deptString);
                $out.write_string (dsctString);
                $in = _invoke ($out);
                String $result = $in.read_string ();
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return queryAirline2 (deptString, dsctString        );
            } finally {
                _releaseReply ($in);
            }
  } // queryAirline2

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:corba/corba.airlineServer/Server:1.0"};

  public String[] _ids ()
  {
    return (String[])__ids.clone ();
  }

  private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
  {
     String str = s.readUTF ();
     String[] args = null;
     java.util.Properties props = null;
     org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);
   try {
     org.omg.CORBA.Object obj = orb.string_to_object (str);
     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
     _set_delegate (delegate);
   } finally {
     orb.destroy() ;
   }
  }

  private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
  {
     String[] args = null;
     java.util.Properties props = null;
     org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);
   try {
     String str = orb.object_to_string (this);
     s.writeUTF (str);
   } finally {
     orb.destroy() ;
   }
  }
} // class _ServerStub
